var entities = [];
var entity = {};
var entityInit = {};
var entityUpdate = {};

var INVOICE_NO = 'MNS2009041';

var KEY = {
    MEISAI     : 'record',
    REVISION   : 'revision',
    INVOICE_NO : 'invoiceNo',
    ID         : 'id',
    DELETED    : 'deleted'
}

//_forでinsertBeforeされたTR行を判別するためのidにつかう接頭辞
var PREFIX_TR_INSERTED = 'tr_inserted_';


var HTTP_STATUS_CODE = {
    PUT_OK    : 200, //OK
    PUT_NG    : 409, //Conflict
    POST_OK   : 201, //Created
    POST_NG   : 409, //Conflict
    GET_OK    : 200, //OK
    GET_NG    : 204, //No Content
    DELETE_OK : 200, //OK
    DELETE_NG : 304  //Not Modified
}

var common = {
    url : '/invoice'
};

function getRandomRGB() {
	var rgb = Math.floor(Math.random() * 0xFFFFFF).toString(16);
	for(count = rgb.length; count < 6; count++){
		rgb = "0" + rgb;
	}

	rgb = "#" + rgb;   
    return rgb;
}
